import Vue from 'vue';
import App from './App';
import VueRouter from 'vue-router';

import Index from './pages/index';
import TokensPage from './pages/tokens';
import TreePage from './pages/tree';
import Highlight from './pages/highlight';
import Compress from './pages/compress';
import DocPage from './pages/doc';
import Compiler from './pages/compiler';
import Interpreter from './pages/interpreter';
import Step from './pages/step';

import FormattedCode from './comps/FormattedCode';
import Tokens from './comps/Tokens';
import Tree from './comps/Tree';
import Doc from './comps/Doc';
import Method from './comps/method';

Vue.config.productionTip = false;

Vue.use(VueRouter);
Vue.component('FormattedCode', FormattedCode);
Vue.component('Tokens', Tokens);
Vue.component('Tree', Tree);
Vue.component('Doc', Doc);
Vue.component('Method', Method);

const routes = [
  { path: '/', name: '', component: Index },
  { path: '/tokens', name: 'tokens', component: TokensPage },
  { path: '/tree', name: 'tree', component: TreePage },
  { path: '/highlight', name: 'highlight', component: Highlight },
  { path: '/compress', name: 'compress', component: Compress },
  { path: '/doc', name: 'doc', component: DocPage },
  { path: '/compiler', name: 'compiler', component: Compiler },
  { path: '/interpreter', name: 'interpreter', component: Interpreter },
  { path: '/step', name: 'step', component: Step },
];

const router = new VueRouter({
  routes,
});

new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
